package com.zhou.org.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhou.framework.dao.Log;
import com.zhou.org.dto.LogQueryDto;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lang.zhou
 * @since 2022-08-23
 */
public interface LogService extends IService<Log> {
    void saveLog(Log l);

    List<Log> listInfo(LogQueryDto dto);

    /**
     * 删除lastDt之前的访问日志
     */
    void deleteLogBeforeDate(Date lastDt);

    List<Log> getErrorLog(Date from, Date to);

    TreeMap<String, Long> getSevenCount();

    Map<String, Long> getAccessStatusCount();
}
